package simulateOS.entity;

public class ExecuteData {

    /**
     * type = 0;num = ？结束语句<p>
     * type = 1;num = ？执行赋值?语句<p>
     * type = 2;num = 2执行自增语句<p>
     * type = 3;num = 3执行自减语句<p>
     * type = 4;num = ？请求A设备时间为？<p>
     * type = 5;num = ？请求B设备时间为？<p>
     * type = 6;num = ？请求C设备时间为？
     */
    private int type;
    private int num;

    public ExecuteData(){
        this.type = 0;
        this.num = 0;
    }

    public ExecuteData(int type,int num){
        this.type = type;
        this.num = num;
    }

    /**
     * type = 0;num = ？结束语句<p>
     * type = 1;num = ？执行赋值?语句，返回1<p>
     * type = 2;num = 2执行自增语句，返回2<p>
     * type = 3;num = 3执行自减语句，返回3<p>
     * type = 4;num = ？请求A设备时间为？，返回4<p>
     * type = 5;num = ？请求B设备时间为？，返回5<p>
     * type = 6;num = ？请求C设备时间为？，返回6
     */
    public int ExecuteDataType(){
        if(this.type == 1){
            return 1;
        }else if(this.type == 2){
            return 2;
        }else if(this.type == 3){
            return 3;
        }else if(this.type == 4){
            return 4;
        }else if(this.type == 5){
            return 5;
        }else if(this.type == 6){
            return 6;
        }else{
            return 0;
        }
    }

    public int getType() {
        return type;
    }

    public int getNum() {
        return num;
    }
}
